#include <unistd.h>
#include "../app/app_buffer.h"
#include "../thirdparty/log.h"
int main(void)
{
    char buff[100];
    buff_t* main_buff = App_buffer_Init();
    App_buffer_Write(main_buff,"helloword",9);
    App_buffer_Write(main_buff,"fucking shit",12);
    int len = App_buffer_Read(main_buff,buff,100);
    if (len == -1)
    {
        perror("read fail\n");
    }
    else
    {
        log_info("%.*s\n",len,buff);
    }
    len = App_buffer_Read(main_buff,buff,100);
    if (len == -1)
    {
        perror("read fail\n");
    }
    else
    {
        log_info("%.*s\n",len,buff);
    }
    return 0;

}